From: Keir Fraser Date: Tue, 22 Jul 2008 07:01:56 +0000 (+0100) Subject: Fix a typo in the macro PCI_BDF2() X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14171^2~5 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=0c9c2001dfc7fb3e5066fb453cfbb653f2158a97;p=xen.git Fix a typo in the macro PCI_BDF2() Signed-off-by: Dexuan Cui --- diff --git a/xen/include/xen/pci.h b/xen/include/xen/pci.h index bfc7354e8e..ff38dce11a 100644 --- a/xen/include/xen/pci.h +++ b/xen/include/xen/pci.h @@ -24,10 +24,10 @@ #define PCI_BUS(bdf) (((bdf) >> 8) & 0xff) #define PCI_SLOT(bdf) (((bdf) >> 3) & 0x1f) #define PCI_FUNC(bdf) ((bdf) & 0x07) -#define PCI_DEVFN(d,f) (((d & 0x1f) << 3) | (f & 0x07)) +#define PCI_DEVFN(d,f) ((((d) & 0x1f) << 3) | ((f) & 0x07)) #define PCI_DEVFN2(bdf) ((bdf) & 0xff) -#define PCI_BDF(b,d,f) (((b * 0xff) << 8) | PCI_DEVFN(d,f)) -#define PCI_BDF2(b,df) (((b & 0xff) << 8) | (df & 0xff)) +#define PCI_BDF(b,d,f) ((((b) & 0xff) << 8) | PCI_DEVFN(d,f)) +#define PCI_BDF2(b,df) ((((b) & 0xff) << 8) | ((df) & 0xff)) struct pci_dev { struct list_head alldevs_list;